﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CXedu.Business;
using CXedu.Model;
using System.Collections;
using Ajeelee.Core.Database;

namespace ICbm.WebServer.Web
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //IArticleBusiness iab = new ArticleBusinessFactory().CreateArticleBusiness();

            //// 1、
            //Article article = iab.GetById(38);

            //if (article != null)
            //{
            //    Response.Write(article.Id + ":" + article.Title + "<br>");
            //}
            //else
            //{
            //    Response.Write("^_^无内容" + "<br>");
            //}

            //// 2、
            //IList<Article> articles = iab.GetAllArticle();
            //foreach (Article item in articles)
            //{
            //    Response.Write(item.Id + ":" + item.Title + "<br>");
            //}

            //Response.Write("^_^" + "<hr>");
            //// 3、
            //Hashtable hb = new Hashtable();
            //hb.Add(ArticleHash.OrderDirection, "desc");
            //PageStructure ps = new PageStructure() { CurrPage = 2, PageSize = 5 };
            //IList<Article> articlePs = iab.GetAllArticleByPage(hb, ps);
            //foreach (Article item in articlePs)
            //{
            //    Response.Write(item.Id + ":" + item.Title + "<br>");
            //}

            //Response.Write("^_^" + "<hr>");
            //// 3、
            //article.Title = article.Title + "(修改)1";
            //iab.Update(article);
            //article = iab.GetById(38);
            //if (article != null)
            //{
            //    Response.Write(article.Id + ":" + article.Title + "<br>");
            //}
            //else
            //{
            //    Response.Write("^_^无内容" + "<br>");
            //}

            ////iab.Insert(article);
            //iab.Delete(87);
        }
    }
}